package DataObjects;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JLabel;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class AreYouSure extends JFrame{
	
	JPanel panel = new JPanel();
	Integer answer=0;
	
	
	
	public AreYouSure ()
	{
		super();
		
		initialize();
		this.setVisible(true);
	}
	
public Integer	initialize ()
	{
	    this.setSize(300, 200);
		getContentPane().add(panel, BorderLayout.NORTH);
		panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JLabel labelAreYouSure = new JLabel(" Are you sure?   ");
		panel.add(labelAreYouSure);
		labelAreYouSure.setFont(new Font("Tahoma", Font.PLAIN, 29));
		
		JButton btnYes = new JButton("YES");
		getContentPane().add(btnYes, BorderLayout.WEST);
		
		
		btnYes.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				
				answer=1;
				
			}
		});
		
		
		
		
		JButton btnNo = new JButton("NO");
		getContentPane().add(btnNo, BorderLayout.EAST);
		
		
		{
		btnYes.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent e) {
				
				answer=0;
				
			}
		});
		
		}
		return answer;
	}
	
          public Integer getAnswer() {
	           return answer;
                                        }


          public void setAnswer(Integer answer) {
	            this.answer = answer;
                                                 }




}
